# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libdazzle
pkgver=3.44.0
pkgrel=1
pkgdesc="Library to delight your users with fancy features"
url="https://gitlab.gnome.org/GNOME/libdazzle"
arch="all"
license="GPL-3.0-or-later"
makedepends="gtk+3.0-dev vala gobject-introspection-dev gtk-doc meson"
checkdepends="xvfb-run"
subpackages="$pkgname-dev $pkgname-lang"
source="https://download.gnome.org/sources/libdazzle/${pkgver%.*}/libdazzle-$pkgver.tar.xz"

if [ "$CARCH" = "armhf" ]; then
	options="!check"; # tests fail on armhf
fi

build() {
	abuild-meson \
		-Denable_gtk_doc=false \
		. output
	meson compile -C output
}

check() {
	xvfb-run meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
eff3f65cbfd4f780afb4bda6137e8d4f1ee2cd0ab21288d07315415944ced1aa2d7ef89c2b7ebb373ac4c46b91d341bed063e9c7d1c21fa083514c8c3c9c518f  libdazzle-3.44.0.tar.xz
"
